﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using EazyCMS.Common;
using EazyCMS.DBUtility;
using DTcms.DBUtility;

namespace EazyCMS.BLL
{
   public partial class jyj_student
    {
           private readonly Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(); //获得站点配置信息
           private readonly DAL.jyj_student dal;
           public jyj_student()
           {
               dal = new DAL.jyj_student(siteConfig.sysdatabaseprefix);
           }

           #region 基本方法===================================


           public string GetUserName(int id) {

            

            string sql = "select user_name from dt_student_info where id='" + id + "'";
            string name = SqlHelper.ExecuScale2(sql).ToString();
            return name;

           
           
           
           }
           /// <summary>
           /// 增加一条数据
           /// </summary>
           public int Add(Model.student_info model)
           {
               return dal.Add(model);
           }

           /// <summary>
           /// 更新一条数据
           /// </summary>
           public bool Update(Model.student_info model)
           {
               return dal.Update(model);
           }

           /// <summary>
           /// 删除一条数据
           /// </summary>
           public bool Delete(int id)
           {
               return dal.Delete(id);
           }

           /// <summary>
           /// 得到一个对象实体
           /// </summary>
           public Model.student_info GetModel(int id)
           {
               return dal.GetModel(id);
           }


           /// <summary>
           /// 增加一条数据
           /// </summary>
           public int Addscore(Model.student_score model)
           {
               return dal.Addscore(model);
           }

           /// <summary>
           /// 更新一条数据
           /// </summary>
           public bool Updatescore(Model.student_score model)
           {
               return dal.Updatescore(model);
           }

           /// <summary>
           /// 删除一条数据
           /// </summary>
           public bool Deletescore(int id)
           {
               return dal.Deletescore(id);
           }


           /// <summary>
           /// 得到一个对象实体
           /// </summary>
           public Model.student_score GetscoreModel(int id)
           {
               return dal.GetscoreModel(id);
           }



           /// <summary>
           /// 获得前几行数据
           /// </summary>
           public DataSet GetList(int Top, string strWhere, string filedOrder)
           {
               return dal.GetList(Top, strWhere, filedOrder);
           }

           /// <summary>
           /// 获得查询分页数据
           /// </summary>
           public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
           {
               return dal.GetList(pageSize, pageIndex, strWhere, filedOrder, out recordCount);
           }
           #endregion

           #region 扩展方法===================================

           /// <summary>
           /// 获得查询分页数据
           /// </summary>
           public DataSet GetfenshuList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
           {
               return dal.GetfenshuList(pageSize, pageIndex, strWhere, filedOrder, out recordCount);
           }
         
           #endregion
       }
  }
